runtime_set_force_gc()

vec<u8> l = [1, 2]
l.push(13)
println(l[0], l[1], l[2])

[u8] l2 = [3, 4]
l2.push(12)
println(l2[0], l2[1], l2[2])

var l3 = vec<u8>{}
l3.push(12)
println(l3.len)
println(l3.cap)

var l4 = vec<u16>{len=1024}
l4.push(12)
println(l4.len)
println(l4.cap)

var l5 = vec<u16>{len=0,cap=2048}
l5.push(12)
println(l5.len)
println(l5.cap)

[int] list = [1, 2]

list[1] = 22

var b = list[1] + 3

println(list[0], list[1], b)

// --- slice and concat
var l6 = ['a', 'b', 'c', 'd', 'e']
var l7 = l6.slice(1, 4)
for v in l7 {
    print(v)
}

println()

l6 = l6.concat(['f', 'g', 'h'])
for v in l6 {
    print(v)
}